package com.example.demo.entity;

import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;

@Data
@Accessors(chain = true)
@ToString
public class SinaUSStockEntity implements Serializable, Comparable<SinaUSStockEntity> {
    /**股票名称*/
    private String stockName;
    /**当前价格*/
    private String currPrice;
    /**涨跌幅度 %*/
    private String incrPercent;
    private String time;
    /**涨跌价格*/
    private String incrPrice;
    private String openPrice;
    private String highPrice;
    private String lowPrice;
    /**52周最高价*/
    private String highPrice52;
    /**52周最低价*/
    private String lowPrice52;
    /**成交量*/
    private String volume;
    /**10日均量*/
    private String averVolume10;
    /**市值*/
    private String totalMarketVal;
    /**每股收益*/
    private String earningPerShare;
    /**市盈率*/
    private String peRatio;
    /**量比*/
    private String unitTurnoverRatio;

    @Override
    public int compareTo(SinaUSStockEntity o) {
        if(Double.valueOf(this.getUnitTurnoverRatio()) < Double.valueOf(o.getUnitTurnoverRatio())){
            return 1;
        }
        return -1;
    }
}
